from utils.client import APIClient
from utils.yaml_config import get_yaml

data = get_yaml('alarm_set.yaml')

class Api_AlarmSet:

    def __init__(self,client:APIClient):
        self.client = client

    def alarm_set_config_get(self):
        report_data = data['config_get']['request']
        return self.client.request(report_data['method'],report_data['path'],json=report_data['json'])
    
    def alarm_set_code_get(self):
        report_data = data['code_get']['request']
        return self.client.request(report_data['method'],report_data['path'],json=report_data['json'])    
    
    def alarm_set_status_get(self):
        report_data = data['status_get']['request']
        return self.client.request(report_data['method'],report_data['path'],json=report_data['json'])
    
    def alarm_set_status_set(self,index=0):
        report_data = data['status_set']['request']
        return self.client.request(report_data['method'],report_data['path'],json=report_data['json'][index])